package com.bootdo.per.service.impl;

import org.apache.commons.collections.map.HashedMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.bootdo.common.utils.Query;
import com.bootdo.per.dao.TeamDao;
import com.bootdo.per.domain.TeamDO;
import com.bootdo.per.service.TeamService;
import com.bootdo.system.domain.DeptDO;



@Service
public class TeamServiceImpl implements TeamService {
	@Autowired
	private TeamDao teamDao;
	
	@Override
	public TeamDO get(Long id){
		return teamDao.get(id);
	}
	
	@Override
	public List<TeamDO> list(Map<String, Object> map){
		return teamDao.list(map);
	}
	
	@Override
	public int count(Map<String, Object> map){
		return teamDao.count(map);
	}
	
	@Override
	public int save(TeamDO team){
		return teamDao.save(team);
	}
	
	@Override
	public int update(TeamDO team){
		return teamDao.update(team);
	}
	
	@Override
	public int remove(Long id){
		return teamDao.remove(id);
	}
	
	@Override
	public int batchRemove(Long[] ids){
		return teamDao.batchRemove(ids);
	}

	@Override
	public List<TeamDO> listByGroup(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return teamDao.listByGroup(map);
	}

	@Override
	public List<DeptDO> listByManager(Long deptId) {
		// TODO Auto-generated method stub
		return teamDao.listByManager( deptId);
	}

	@Override
	public List<DeptDO> listBySupervisor(Long deptId) {
		// TODO Auto-generated method stub
		return teamDao.listBySupervisor( deptId);
	}

	@Override
	public int saveList(List<TeamDO> list) {
		// TODO Auto-generated method stub
		return teamDao.saveList(list);
	}

	@Override
	public int listByGroupCount(Query query) {
		// TODO Auto-generated method stub
		return teamDao.listByGroupCount(query);
	}

	@Override
	public int updateList(List<TeamDO> list) {
		// TODO Auto-generated method stub
		return teamDao.updateList(list);
	}

	@Override
	public List<String> deptList(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return teamDao.deptList(map);
	}

	@Override
	public List<Map<String, Object>> getTeamResult(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return teamDao.getTeamResult(map);
	}


	/**
	 * 根据年份得到所有团队的团队名
	 */
	@Override
	public List<String> getTeamByYear(Integer year) {
		return teamDao.getTeamByYear(year);
	}

	/**
	 * 得到所有团队的12个月的分数
	 */
	@Override
	public List<TeamDO> listAllScore(String teamName) {
		return teamDao.listAllScore(teamName);
	}

	/**
	 * 根据部门或评分人和年份得到所有团队的团队名
	 */
	@Override
	public List<String> getTeamByDeptAndSys(Map<String, Object> map) {
		return teamDao.getTeamByDeptAndSys(map);

	}

	
}
